package com.citycloud.ccuap.tc.yq.entity;

import static org.springframework.data.mybatis.annotations.Id.GenerationType.UUID;

import java.util.Date;

import org.springframework.data.mybatis.annotations.Entity;
import org.springframework.data.mybatis.annotations.Column;
import org.springframework.data.mybatis.annotations.Condition;
import org.springframework.data.mybatis.annotations.Conditions;
import org.springframework.data.mybatis.annotations.Id;
import org.springframework.data.repository.query.parser.Part;

import com.citycloud.ccuap.framework.service.Model;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * view实体对象
 * @author sufeng
 *
 */
@Data
@NoArgsConstructor
@Entity(table = "ap_t_meta_table_view")
public class MetaTable implements Model {
	private static final long serialVersionUID = 1L;
	
	@Id(strategy = UUID)
	@Column(name = "obj_id")
	private String objId;
	
	@Column(name = "table_ename")
	@Condition(type = Part.Type.LIKE)
	private String tableEname;
	
	@Column(name = "table_cname")
	@Condition(type = Part.Type.LIKE)
	private String tableCname;
	
	@Column(name = "table_desc")
	@Condition(type = Part.Type.LIKE)
	private String tableDesc;
	
	@Column(name = "table_type")
	@Condition(type = Part.Type.LIKE)
	private String tableType;
	
	@Column(name = "last_user")
	@Condition(type = Part.Type.LIKE)
	private String lastUser;
	
	@Column(name = "is_rj")
	@Condition
	private Long isRj;
	
	@Column(name = "theme")
	@Condition(type = Part.Type.LIKE)
	private String theme;
	
	@Column(name = "db_name")
	@Condition(type = Part.Type.LIKE)
	private String dbName;
	
	@Column(name = "db_id")
	@Condition(type = Part.Type.LIKE)
	private String dbId;
	
	@Column(name = "s_tables")
	@Condition(type = Part.Type.LIKE)
	private String sTables;
	
	@Column(name = "cate_path")
	@Condition(type = Part.Type.LIKE)
	private String catePath;
	
	@Column(name = "cate_id")
	@Condition(type = Part.Type.LIKE)
	private String cateId;
	
	@Column(name = "is_encypt")
	@Condition
	private Long isEncypt;
	
	@Column(name = "type_name")
	@Condition(type = Part.Type.LIKE)
	private String typeName;
	
	@Column(name = "is_export")
	@Condition
	private Long isExport;
	
	@Column(name = "modifierid")
	@Condition(type = Part.Type.LIKE)
	private String modifierid;
	
	@Column(name = "createrid")
	@Condition(type = Part.Type.LIKE)
	private String createrid;
	
	@Column(name = "creatername")
	@Condition(type = Part.Type.LIKE)
	private String creatername;
	
	@Column(name = "modifiername")
	@Condition(type = Part.Type.LIKE)
	private String modifiername;
	
	@Column(name = "createdate")
	@Conditions({ 
		@Condition,
		@Condition(type = Part.Type.GREATER_THAN_EQUAL, properties="startCreatedate"), 
		@Condition(type = Part.Type.LESS_THAN, properties="endCreatedate") 
	})
	private Date createdate;
	
	@Column(name = "modifydate")
	@Conditions({ 
		@Condition,
		@Condition(type = Part.Type.GREATER_THAN_EQUAL, properties="startModifydate"), 
		@Condition(type = Part.Type.LESS_THAN, properties="endModifydate") 
	})
	private Date modifydate;
	
	@Column(name = "is_deleted")
	private boolean isDeleted;
	


}